Mac OS Runtime for Java (MRJ) 2.1.1 (Debug) is the debugging version of MRJ 2.1.1. It is intended to be used by Java developers who run into problems using MRJ 2.1.1 and who wish to help us isolate those problems. This version may not be redistributed.
You should already be familiar with Technote 1154, “Debugging Java Code With MacsBug” which describes some extra debugging tools available only with the debug build. This Technote is available at http://developer.apple.com/technotes/tn/tn1154.html
WARNING: Do not use this package until you have installed MacsBug. MacsBug can be found at http://developer.apple.com/tools/
Bug reports should be logged at http://developer.apple.com/bugreporter/
Contents
This package contains debug versions of MRJLib, JDKClasses.zip and MRJClasses.zip.
JDKClasses.zip and MRJClasses.zip will provide more useful information when MRJ throws an exception. The “line number tables” have not been stripped out of the compiled code, so the stack trace dumped by an exception (or displayed by the MRJ MacsBug dcmd options “mrj sc” and “mrj threads”) will include valid source line numbers. This is of great help to us in debugging if you send us MacsBug logs or console output. NOTE: You must disable the JITC to reliably get line numbers. To do so, move the “MRJ Symantec JITC” library from the “MRJ Libraries” folder to somewhere outside the System folder.
MRJLib contains user breaks (warnings) that MRJ will generate when it detects it has entered an invalid state. These warnings will drop you into MacsBug; you can just continue execution by typing “g” in MacsBug followed by the return key. There is no need to kill the target application (“es”) since user breaks are not crashes!
MRJLib has been compiled with PowerPC “traceback tables” enabled. This results in much more accurate native stack crawls that correctly display the names of functions/methods. This is of great help to us in debugging if you send us MacsBug logs when a crash or user break occurs.
This version of MRJLib has been compiled without optimizations; therefore, performance will be slower than in the official (optimized) version of MRJ 2.1.1.
Installation Instructions
To use the debug version of MRJ 2.1.1, you must have already installed the release version of MRJ 2.1.1. The components in this debugging package will replace only a few of the components that are installed with MRJ 2.1.1. This package does not come with its own installer; therefore, you will have to drag install the debug pieces into your “MRJ Libraries” folder.
The critical thing to remember is that MRJLib and MRJ Symantec JITC are both Code Fragment Manager (CFM) import libraries, so they must be moved out of the CFM search path to be disabled. CFM import library search paths are detailed in Chapter 3 of Inside Macintosh: PowerPC System Software. This book is available at http://developer.apple.com/techpubs/mac/PPCSoftware/PPCSoftware-2.html
Installing MRJ 2.1.1 (Debug)
1. Quit all Java applications.
2. Create a folder on the root of your boot drive called “MRJ 2.1.1 Disabled Pieces”.
3. Open the “MRJ Libraries” folder in your “Extensions” folder on your boot drive.
4. Drag the file “MRJLib” and the folder “MRJClasses” from the “MRJ Libraries” folder into the folder “MRJ 2.1.1 Disabled Pieces”.
5. (Optional) If you wish to disable the JITC to enable line numbers in Java stack traces, drag the file “MRJ Symantec JITC” from the “MRJ Libraries” folder into the folder “MRJ 2.1.1 Disabled Pieces”.
6. Drag the file “MRJLib” and the folder “MRJClasses” from this debug package into the “MRJ Libraries” folder.
Reinstalling MRJ 2.1.1
Since rerunning the MRJ 2.1.1 installer may not replace the debug components, you should drag install MRJ 2.1.1 back again. To switch back to using MRJ 2.1.1,
1. Quit all Java applications.
2. Create a folder on the root of your boot drive called “MRJ 2.1.1 (Debug) Pieces”.
3. Open the “MRJ Libraries” folder in your “Extensions” folder on your boot drive.
4. Drag the file “MRJLib” and the folder “MRJClasses” from the “MRJ Libraries” folder into the folder “MRJ 2.1.1 (Debug) Pieces”.
5. Drag the file “MRJLib” and the folder “MRJClasses” from the “MRJ 2.1.1 Disabled Pieces” folder into the “MRJ Libraries” folder.
6. (Optional) If you disabled the JITC in step 5 of “Installing MRJ 2.1.1 (Debug)” above, you should reinstall it by dragging “MRJ Symantec JITC” from the “MRJ 2.1.1 Disabled Pieces” folder into the “MRJ Libraries” folder.
To determine which version of MRJ is active, click on the file “MRJLib” in the “MRJ Libraries” folder and choose Get Info from the File menu. The debug copy will contain the Version string ‘MRJ 2.1.1 (Debug)’.
Apple, the Apple logo, AppleScript, Mac, Macintosh, and QuickTime are trademarks of Apple Computer, Inc., registered in the U.S. and other countries. PowerPC is a trademark of International Business Machines Corporation, used under license therefrom. Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. Netscape Navigator is a trademark of Netscape Communications Corporation. Other product and company names mentioned herein may be trademarks of their respective companies.